
#include"customdb_operator.h"



int main(int args,char *argv[])
{
    CCustomOperator customerOperator;

    //argv must must large than 3
    if(args<4)
        return 1;

    if(!strcmp(argv[1],"add-member"))
    {
        //add member to db
        customerOperator.addMember(argv[2],argv[3],argv[4]);;
    }
    else
    {
        if(!strcmp(argv[1],"add-card"))
        {
            //bind menber with card
            if(args==5)
            {
                customerOperator.addCard(argv[2],argv[3] ,argv[4]);
            }
            else
                customerOperator.addCard(argv[2],argv[3]);
        }
        else
        {
           cout<<"error,usage:..."<<endl ;
        }
    }
    return 0;
}
